#pragma once


#include<iostream>

using namespace std;

namespace yyh
{
	template<class T>
	struct ListNode
	{
		ListNode(const T& val = T())
			:_prev(nullptr)
			,_pnext(nullptr)
			,_val(val)
		{ }
		ListNode<T>* _prev;
		ListNode<T>* _pnext;
		T _val;
	};

	template<class T>
	class list
	{
		typedef ListNode<T>* Node
	public:
		void empty_init()
		{
			_head = new Node;
			_head->_prev = nullptr;
			_head->_pnext = nullptr;
			_size = 0;
		}

		list()
		{
			empty_init();
		}

		list(const list<T>& lt)
		{
			empty_init();
			for (auto& e : lt)
			{
				push_back(e);
			}
		}

	private:
		Node _head;
		size_t _size;
	};

	void test()
	{
		list<int> l1;

	}
}